home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGMISC
/
FPCDOCS.LZH
/
VIDEO.SEQ
< prev
next >
Wrap
Text File
|
1988-08-05
|
2KB
|
53 lines
\ VIDEO.SEQ Direct VIDEO Screen output by Tom Zimmer
FILES DEFINITIONS
VARIABLE VIDEO.SEQ
FORTH DEFINITIONS
DECIMAL
VARIABLE ATTRIB 7 ATTRIB !-T \ display attribute value
VARIABLE VIDEO-SEG \ Segment of display
VARIABLE TYPESEG \ video type segment, the segment we are typing from.
VARIABLE VMODE-VAR \ Video mode save variable
VARIABLE BLANKING \ Are we blanking during screen drawing?
CODE ?VMODE ( --- N1 ) \ Get the video mode from DOS
MOV AH, # $0F
INT $10
SUB AH, AH
MOV VMODE-VAR AX \ Save video mode in VMODE-VAR
1PUSH END-CODE
CODE VMODE.OK ( --- )
MOV AH, # $0F
INT $10
CMP AL, # 7
0= IF NEXT
THEN
CMP AL, # 3 \ If less than mode 3
0<> IF
MOV AH, # 0
MOV AL, # 3 \ Set mode 3
INT $10
THEN
MOV AH, # $0F
INT $10
SUB AH, AH
MOV VMODE-VAR AX \ Save video mode in VMODE-VAR
NEXT END-CODE
DEFER INITMONO ' NOOP IS INITMONO \ INITIALIZATION VECTOR AVAILABLE
DEFER INITCOLOR ' NOOP IS INITCOLOR \ FOR MONOCHROME AND COLOR
: VMODE.SET ( --- )
?VMODE 7 =
IF $0B000 INITMONO
ELSE VMODE.OK
$0B800 INITCOLOR
THEN VIDEO-SEG ! ;